<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格隔行换色</title>
    <style type="text/css">
        #tal {
            border: 1px solid #cc9eff;
            text-align: center;
            width: 40%;
            /*消除单元格间隔*/
            border-collapse: collapse;
        }

        #tal tr th {
            font-weight: bold;
            font-size: 16px;
            background-color: lightpink;
            border: 1px solid gray;
        }

        #tal tr td {
            border: 1px solid gray;
        }
    </style>
</head>
<body>
<table id="tal">
    <tr>
        <th>标题1</th>
        <th>标题2</th>
        <th>标题3</th>
        <th>标题4</th>
    </tr>
    <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
    </tr>
    <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
    </tr>
    <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
    </tr>
    <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
    </tr>
</table>
<script type="text/javascript" src="../js/Day_2/day_2.js"></script>
</body>
</html>